<!-- 模板 -->
<template>
    <div class="pop" v-show="show">
        <transition :name="maskerTransition">
            <div class="pop__masker" v-show="isComponentShow"  @click="onHide"></div>
        </transition>
        <div class="pop__inner">
            <transition :name="dialogTransition" v-on:after-leave="afterLeave">
                <div class="pop__inner__dialog" v-show='isComponentShow'>
                    <div class="prize_208"></div>
                    <a href="javascript:;" class="pop-close"  @click="onHide">知道了</a>
                </div>
            </transition>
        </div>
    </div>
</template>


<!-- js -->
<script>
    export default{
       data(){
            return{
                show: !1,
                isComponentShow: !1,
                maskerTransition: "aui-pop-masker",
                dialogTransition: "aui-pop"
            }
        },
        props: {
            isShow: {
                type: Boolean,
                default: !1
            }
        },
        watch: {
            isShow(){
                if(!this.isShow){
                    return;
                }
                this.show = 1;

                setTimeout(() => {
                    this.isComponentShow = !0;
                    setTimeout(() => {
                        this.dropDown = !0;
                    }, 400);
                }, 10);
            }
        },
        methods: {
            onHide() {
                this.isComponentShow = !1;
            },
            // 点击确认按钮之后，可能会存在回调事件
            afterLeave(){
                this.show = !1;
                // 回调
                this.$emit('on-cb');
            }
        }
    }
</script>

<!-- scss -->
<style scoped lang="scss">
@import "../../styles/views/pop.scss";
.prize_208{
   width: 4.5rem;
   height: 5.5rem;
   background: url(../../assets/images/208_bg.png) 50% no-repeat;
   background-size: 4.5rem 5.5rem; 
}
</style>
